package com.c3w.synchro.member.bean;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * User: magirard
 * Date: 12-10-04
 */
@Entity
public class Athlete extends Member {

    @Column(nullable = false)
    private String clubName;

    private String category;

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getClubName() {
        return clubName;
    }

    public void setClubName(String clubName) {
        this.clubName = clubName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Athlete)) return false;
        if (!super.equals(o)) return false;

        Athlete athlete = (Athlete) o;

        if (category != null ? !category.equals(athlete.category) : athlete.category != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (category != null ? category.hashCode() : 0);
        return result;
    }
}
